Release 10.1A: OpenEdge Development:
Programming Interfaces


Disconnecting databases

By default, OpenEdge disconnects all databases at the end of a session. You can explicitly disconnect a database with the DISCONNECT statement, which has the following syntax:

Syntax
DISCONNECT logical-database-name 

The logicaldatabasename represents the logical name of a connected database. It can be an unquoted string, a quoted string, or a character expression.

A DISCONNECT statement does not execute until all active procedures that reference the database end or stop:

i-mainprc1.p
CONNECT -db mydb -1. 
RUN i-subproc1.p. 

i-subproc1.p
RUN i-subproc2.p. 
FOR EACH mydb.customer FIELDS (name address city state postal-code): 
  UPDATE name address city state postal-code. 
END. 

i-subproc2.p
DISCONNECT mydb. 

In these procedures, the mydb database is not disconnected until the end of the i-subproc1.p procedure.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095